package com.choosefine.it.manager.service.Impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.choosefine.it.base.dto.PageDTO;
import com.choosefine.it.manager.dao.ManagerTeamCollectionMapper;
import com.choosefine.it.manager.model.ManagerEvaluationInfo;
import com.choosefine.it.manager.model.ManagerTeamCollection;
import com.choosefine.it.manager.service.ManagerTeamCollectionService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

/**
 * @author 潘钱钦 下午9:00:56
 *
 */
@Service("managerTeamCollectionService")
public class ManagerTeamCollectionServiceImpl implements ManagerTeamCollectionService {
	@Autowired
	private ManagerTeamCollectionMapper managerTeamCollectionMapper;

	/*@Override yuxin-delete-3.7
	public int addCollectTeam(ManagerTeamCollection managerTeamCollection) {
		return managerTeamCollectionMapper.insertSelective(managerTeamCollection);
	}*/

	@Override
	public Page<ManagerTeamCollection> getManagerTeamCollection(String userCode, PageDTO page) {
		PageHelper.startPage(page.getPageNum(), page.getPageSize());
		Page<ManagerTeamCollection> pageResult = managerTeamCollectionMapper.selectByUserCode(userCode);
		return pageResult;
	}

	@Override
	public ManagerTeamCollection selectTeamFindProjectListById(Integer publishId) {
		return managerTeamCollectionMapper.selectTeamFindProjectListById(publishId);
	}



	/*
	 * (non-Javadoc)
	 * 
	 * @see com.choosefine.it.manager.service.ManagerTeamCollectionService#
	 * selectByManagerUserCodeAndPublishId(java.lang.String)
	 */
	@Override
	public ManagerTeamCollection selectByManagerUserCodeAndPublishId(Map<String, Object> params) {
		return managerTeamCollectionMapper.selectByManagerUserCodeAndPublishId(params);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.choosefine.it.manager.service.ManagerTeamCollectionService#
	 * colletTeamAgain(java.util.Map)
	 */
	@Override
	public int colletTeamAgain(Map<String, Object> params) {
		return managerTeamCollectionMapper.colletTeamAgain(params);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.choosefine.it.manager.service.ManagerTeamCollectionService#
	 * selectManagerTeamCollectionIsRepeat(java.lang.String)
	 */
	@Override
	public ManagerTeamCollection selectManagerTeamCollectionIsRepeat(Map<String, Object> params) {
		return managerTeamCollectionMapper.selectManagerTeamCollectionIsRepeat(params);
	}

}
